package bma.common.langutil.pipeline;

/**
 * 通用通道列表接口
 * 
 * @author 关中
 * @since 1.0 (imported from BMA.ESP Project)
 * 
 * @param <TYPE>
 */
public interface CommonPipeline<TYPE> {

	public void addFirst(String name, TYPE item);

	public void addLast(String name, TYPE item);

	public void addBefore(String baseName, String name, TYPE item);

	public void addAfter(String baseName, String name, TYPE item);

	public void remove(TYPE item);

	public TYPE remove(String name);

	public <TT extends TYPE> TT remove(Class<TT> itemType);

	public TYPE removeFirst();

	public TYPE removeLast();

	public void replace(TYPE olditem, String newName, TYPE newitem);

	public TYPE replace(String oldName, String newName, TYPE newitem);

	public <TT extends TYPE> TT replace(Class<TT> olditemType, String newName,
			TYPE newitem);

	public TYPE getFirst();

	public TYPE getLast();

	public TYPE get(String name);

	public <TT extends TYPE> TT get(Class<TT> itemType);

	public void clear();

}
